package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TbViolationMapper;
import com.ruoyi.system.domain.TbViolation;
import com.ruoyi.system.service.ITbViolationService;

/**
 * 违章信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-21
 */
@Service
public class TbViolationServiceImpl implements ITbViolationService 
{
    @Autowired
    private TbViolationMapper tbViolationMapper;

    /**
     * 查询违章信息
     * 
     * @param id 违章信息主键
     * @return 违章信息
     */
    @Override
    public TbViolation selectTbViolationById(Long id)
    {
        return tbViolationMapper.selectTbViolationById(id);
    }

    /**
     * 查询违章信息列表
     * 
     * @param tbViolation 违章信息
     * @return 违章信息
     */
    @Override
    public List<TbViolation> selectTbViolationList(TbViolation tbViolation)
    {
        return tbViolationMapper.selectTbViolationList(tbViolation);
    }

    /**
     * 新增违章信息
     * 
     * @param tbViolation 违章信息
     * @return 结果
     */
    @Override
    public int insertTbViolation(TbViolation tbViolation)
    {
        return tbViolationMapper.insertTbViolation(tbViolation);
    }

    /**
     * 修改违章信息
     * 
     * @param tbViolation 违章信息
     * @return 结果
     */
    @Override
    public int updateTbViolation(TbViolation tbViolation)
    {
        return tbViolationMapper.updateTbViolation(tbViolation);
    }

    /**
     * 批量删除违章信息
     * 
     * @param ids 需要删除的违章信息主键
     * @return 结果
     */
    @Override
    public int deleteTbViolationByIds(Long[] ids)
    {
        return tbViolationMapper.deleteTbViolationByIds(ids);
    }

    /**
     * 删除违章信息信息
     * 
     * @param id 违章信息主键
     * @return 结果
     */
    @Override
    public int deleteTbViolationById(Long id)
    {
        return tbViolationMapper.deleteTbViolationById(id);
    }
}
